﻿//-----------------------------------------------------------------------
// <copyright file="IRuleSetProvider.cs" company="tuliprules.org">
//     Copyright (c) 2010 tuplelister, tuliprules.org.
// </copyright>
// <summary>This is the IRuleSetProvider interface.</summary>
//-----------------------------------------------------------------------

namespace Tulip.Rules
{
    /// <summary>
    /// Represents a rule set provider.
    /// </summary>
    public interface IRuleSetProvider
    {
        /// <summary>
        /// Adds a rule set to the provider store.
        /// </summary>
        /// <param name="ruleSet">
        /// The rule set to be added to the store.
        /// </param>
        void Add(RuleSet ruleSet);

        /// <summary>
        /// Adds a keyed collection of rule sets to the provider store.
        /// </summary>
        /// <param name="ruleSets">
        /// A keyed collection of rule sets to be added to the store.
        /// </param>
        void Add(RuleSetDictionary ruleSets);

        /// <summary>
        /// Returns a rule set from the provider store.
        /// </summary>
        /// <param name="ruleSetInfo">
        /// Rule set metadata used to select the required rule set.
        /// </param>
        /// <returns>
        /// A rule set.
        /// </returns>
        RuleSet GetRuleSet(RuleSetInfo ruleSetInfo);

        /// <summary>
        /// Deletes a rule set from the provider store.
        /// </summary>
        /// <param name="ruleSetInfo">
        /// Rule set metadata used to select the required rule set.
        /// </param>
        void Delete(RuleSetInfo ruleSetInfo);

        /// <summary>
        /// Deletes all existing rule sets from the provider store.
        /// </summary>
        void DeleteAll();
    }
}
